//
//  MCShareBaseBackgroundView.swift
//  StoreManage
//
//  Created by MC on 2018/2/1.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCShareBaseBackgroundView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.frame = CGRect.init(x: 0, y: 0, width: MCScreenWidth / 2, height: MCScreenWidth / 2)
        self.backgroundColor = UIColor.white
        
        self.addSubview(bgView)
        bgView.snp.remakeConstraints { (make) ->Void in
            make.edges.equalTo(self)
        }
        
//        bgView.addSubview(cropView)
//        cropView.snp.remakeConstraints { (make) ->Void in
//            make.edges.equalTo(bgView)
//        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private lazy var bgView: UIView = {
        let view = UIView()
//        view.backgroundColor = UIColor.white
//        view.layer.shadowColor = UIColor.MCGray_middle.cgColor
//        view.layer.shadowOffset = CGSize.init(width: 0, height: 0)
//        view.layer.shadowOpacity = 0.5
//        view.layer.shadowRadius = 4
        
        
        
        view.backgroundColor = UIColor.white
        view.layer.cornerRadius = 7
        
        view.layer.shadowColor = UIColor.MCGray_middle.cgColor
        view.layer.shadowOpacity = 1.0
        view.layer.shadowOffset = CGSize(width: 0, height: 0)
        view.layer.shadowRadius = 5
        view.layer.masksToBounds = false
        
        return view
    }()
    
    public lazy var cropView: UIView = {
        
        let view = UIView()
        view.layer.masksToBounds = true
        view.layer.cornerRadius = 5
        view.backgroundColor = UIColor.white
        view.layer.borderColor = UIColor.MCGray_light.cgColor
        view.layer.borderWidth = 1
        return view
    }()
}


